﻿using System;
using System.Collections;
using System.Data;

namespace NoteHelper
{
    public enum FormCommand
    {
        Display,
        Insert,
        Edit,
        Query
    }

    public interface IBaseView
    {
        event EventHandler Insert;
        event EventHandler Edit;
        event EventHandler Remove;
        event EventHandler Copy;
        event EventHandler Query;
        event EventHandler Accept;
        event EventHandler Cancel;
        event EventHandler Print;
        event EventHandler Help;

        /// <summary>
        /// 显示的记录
        /// </summary>
        DataTable DisplayList { get; set; }

        /// <summary>
        /// 数据
        /// </summary>
        Hashtable RowData { get; set; }

        FormCommand Cmd { get; set; }

        /// <summary>
        /// 进入编辑状态，即令控件enable
        /// </summary>
        void BeginEdit();

        /// <summary>
        /// 结束编辑状态，即令控件disable
        /// </summary>
        void EndEdit();

        int GetRowIndex();

        void Notify(string notification);
    }
}
